<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 15/11/27
 * Time: 15:10
 */

namespace Test\Controller;


class TestCheckController extends TestController {


    public function test01(){
        if(IS_POST){
            $p = I('post.p','');
            dump($p);

            /*
             * /^[0-9a-zA-Z\\\\,.?><;:!@#$%^&*()_+-=\[\]\{\}\|]{6,16}$/
             * 密码验证
            */

            if(preg_match("/^[a-zA-Z]{1}[a-zA-Z0-9_]{5,15}$/",$p)){
                echo "用户格式正确";
            }else{
                echo "用户格式错误";
            }
        }

        $this->display();


    }
    public function index(){
        $this->display();
    }

}